const mysql=require('mysql');

const db=mysql.createConnection({
        host:'localhost',
        user:'root',
        password:'root',
        database:'tiantianpeiwan'
});

let Nmodule={
    lol:function(a,b,fn){
        let sql=`SELECT U_address,U_falsename,U_photo,U_sex,U_age,U_id FROM p_playuser a LEFT JOIN p_user b ON a.U_co=b.U_co WHERE G_id=${a} AND PU_price=${b}`
        db.query(sql,function(err,data){
            fn(err,data)
        })
    },
    cj:function(a,b,fn){
        let sql=`SELECT U_address,U_falsename,U_photo,U_sex,U_age,U_id FROM p_playuser a LEFT JOIN p_user b ON a.U_co=b.U_co WHERE G_id=${a} AND PU_price=${b}`
        db.query(sql,function(err,data){
            fn(err,data)
        })
    }
}


module.exports=Nmodule;